package com.bdqn.mapper.Material;

import com.bdqn.entity.Material;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MaterialMapper {
    /**
     * 查询所有物资
     */
    List<Material> findByMaterial(@Param("mat") Material mat,@Param("page")int page,@Param("limit" )int limit);

    /**
     * 查询所有个数
     * @param mat
     * @param page
     * @param limit
     * @return
     */
    int count(Material mat,@Param("page")int page,@Param("limit" )int limit);
    /**
     * 根据多个id查询物资
     */
    List<Material> findByListId(@Param("page")int page,@Param("limit" )int limit,List ids);
    /**
     * 查询多个id总个数
     */
    int countListId(List ids);

    /**
     * 查询所有物资信息
     * @return
     */
    List<Material> findAll();

/**
 * 带条件查询
 */
//AND  materialName  like CONCAT ('%', #{name},'%')

List<Material> selectmaterial(@Param("page")Integer page,@Param("limit" )Integer limit,@Param("name" ) String name);

    int materialcount(String m);
}
